package com.yunhe.rentcars.pro.controller.system;

import com.yunhe.rentcars.commons.dto.Pageable;
import com.yunhe.rentcars.pro.entity.system.SysLog;
import com.yunhe.rentcars.pro.service.system.SysLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

@Controller
@RequestMapping("/syslog")
public class SysLogController {
    @Autowired
    private SysLogService sysLogService;

    //跳转到日志列表页
   @RequestMapping
    public String busiLogList(){
        return "system/syslog/loglist";
    }

    @RequestMapping("/listData")
    @ResponseBody
    public Pageable<SysLog> listDate(SysLog sysLog, Integer offset, Integer limit, Date startTime, Date endTime){
        return sysLogService.findPage( sysLog,offset,limit,startTime,endTime);
    }

}
